
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.base.DataBase"%>
<%@ page import="com.mysql.jdbc.ResultSet" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'show.jsp' starting page</title>
    
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
  </head>
  
  <body>
    This is my JSP page. <br>
    <% DataBase db =new DataBase();
	ResultSet rs = db.resultset();
	
	while(rs.next())
	{
		String name=rs.getString("name");
		String title=rs.getString("title");
		String mail= rs.getString("mail");
		String msg =rs.getString("msg");
	%>
	<table border="0" width="100%">
		<tr>
			<td>
			Name :   
			<%=name%>
			</td>	
		</tr>
		<tr>
			<td>
			Title :   
			<%=title%>
			</td>	
		</tr>
		<tr>
			<td>
			E_Mail :   
			<%=mail%>
			</td>	
		</tr>
		<tr >
			<td width="100%" colspan="6">
			Message :   
			<%=msg%>
			</td>	
		</tr>
	</table>
	<%}
	%>

  </body>
  <a href="msg.jsp">Add Messages</a>
</html>
